home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / Miro_Downloader.exe / views.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-11-12  |  4.0 KB  |  81 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from app import db
  5. import feed
  6. import folder
  7. import downloader
  8. import guide
  9. import item
  10. import tabs
  11. import playlist
  12. import searchengines
  13. import theme
  14. import indexes
  15. import filters
  16. import maps
  17. import sorts
  18. from threading import Condition
  19. initialized = False
  20.  
  21. def initialize():
  22.     global initialized, allTabs, guideTabs, staticTabs, feedTabs, playlistTabs, selectedTabs, tabOrders, channelTabOrder, playlistTabOrder, items, fileItems, toplevelItems, nonContainerItems, unwatchedItems, watchableItems, newWatchableItems, feeds, remoteDownloads, httpauths, staticTabsObjects, autoUploads, guides, default_guide, manualFeed, singleFeed, directoryFeed, newlyDownloadedItems, downloadingItems, pausedItems, manualDownloads, autoDownloads, playlists, playlistFolders, channelFolders, searchEngines, searchEngines, themeHistories
  23.     initialized = True
  24.     db.createIndex(indexes.objectsByClass)
  25.     allTabs = db.filter(filters.mappableToTab).map(maps.mapToTab)
  26.     allTabs.createIndex(indexes.tabType)
  27.     guideTabs = allTabs.filterWithIndex(indexes.tabType, 'guide').sort(sorts.guideTabs)
  28.     staticTabs = allTabs.filterWithIndex(indexes.tabType, 'statictab').sort(sorts.staticTabs)
  29.     feedTabs = allTabs.filterWithIndex(indexes.tabType, 'feed')
  30.     playlistTabs = allTabs.filterWithIndex(indexes.tabType, 'playlist')
  31.     selectedTabs = allTabs.filter((lambda x: x.selected))
  32.     tabOrders = db.filterWithIndex(indexes.objectsByClass, tabs.TabOrder)
  33.     tabOrders.createIndex(indexes.tabOrderType)
  34.     channelTabOrder = tabOrders.filterWithIndex(indexes.tabOrderType, u'channel')
  35.     playlistTabOrder = tabOrders.filterWithIndex(indexes.tabOrderType, u'playlist')
  36.     items = db.filterWithIndex(indexes.objectsByClass, item.Item)
  37.     fileItems = db.filter((lambda x: isinstance(x, item.FileItem)))
  38.     toplevelItems = items.filter((lambda x: x.feed_id is not None))
  39.     nonContainerItems = items.filter((lambda x: not (x.isContainerItem)))
  40.     unwatchedItems = nonContainerItems.filter(filters.unwatchedItems)
  41.     watchableItems = nonContainerItems.filter(filters.watchableItems)
  42.     newWatchableItems = nonContainerItems.filter(filters.newWatchableItems)
  43.     feeds = db.filterWithIndex(indexes.objectsByClass, feed.Feed)
  44.     remoteDownloads = db.filterWithIndex(indexes.objectsByClass, downloader.RemoteDownloader)
  45.     httpauths = db.filterWithIndex(indexes.objectsByClass, downloader.HTTPAuthPassword)
  46.     staticTabsObjects = db.filterWithIndex(indexes.objectsByClass, tabs.StaticTab)
  47.     remoteDownloads.createIndex(indexes.downloadsByDLID)
  48.     remoteDownloads.createIndex(indexes.downloadsByURL)
  49.     autoUploads = remoteDownloads.filter(filters.autoUploadingDownloaders, sortFunc = sorts.downloadersByEndTime)
  50.     items.createIndex(indexes.itemsByFeed, sortFunc = sorts.item)
  51.     toplevelItems.createIndex(indexes.itemsByFeed)
  52.     items.createIndex(indexes.itemsByParent)
  53.     items.createIndex(indexes.itemsByChannelFolder, sortFunc = sorts.item)
  54.     feeds.createIndex(indexes.feedsByURL)
  55.     feeds.createIndex(indexes.byFolder)
  56.     guides = db.filterWithIndex(indexes.objectsByClass, guide.ChannelGuide)
  57.     guides.createIndex(indexes.guidesByURL)
  58.     default_guide = guides.filter((lambda x: x.getDefault()))
  59.     manualFeed = feeds.filterWithIndex(indexes.feedsByURL, 'dtv:manualFeed')
  60.     singleFeed = feeds.filterWithIndex(indexes.feedsByURL, 'dtv:singleFeed')
  61.     directoryFeed = feeds.filterWithIndex(indexes.feedsByURL, 'dtv:directoryfeed')
  62.     items.createIndex(indexes.itemsByState)
  63.     newlyDownloadedItems = items.filterWithIndex(indexes.itemsByState, 'newly-downloaded')
  64.     downloadingItems = items.filterWithIndex(indexes.itemsByState, 'downloading')
  65.     pausedItems = items.filterWithIndex(indexes.itemsByState, 'paused')
  66.     downloadingItems.createIndex(indexes.downloadsByCategory)
  67.     manualDownloads = items.filter(filters.manualDownloads)
  68.     autoDownloads = items.filter(filters.autoDownloads)
  69.     playlists = db.filterWithIndex(indexes.objectsByClass, playlist.SavedPlaylist)
  70.     playlists.createIndex(indexes.playlistsByItemID, multiValued = True)
  71.     playlists.createIndex(indexes.playlistsByItemAndFolderID, multiValued = True)
  72.     playlists.createIndex(indexes.byFolder)
  73.     playlistFolders = db.filterWithIndex(indexes.objectsByClass, folder.PlaylistFolder)
  74.     playlistFolders.createIndex(indexes.playlistsByItemID, multiValued = True)
  75.     channelFolders = db.filterWithIndex(indexes.objectsByClass, folder.ChannelFolder)
  76.     channelFolders.createIndex(indexes.foldersByTitle)
  77.     searchEngines = db.filterWithIndex(indexes.objectsByClass, searchengines.SearchEngine)
  78.     searchEngines = searchEngines.sort(sorts.searchEngines)
  79.     themeHistories = db.filterWithIndex(indexes.objectsByClass, theme.ThemeHistory)
  80.  
  81.